<template>
    <div>
        历史记录
    </div>
</template>

<script>
export default {
    beforeRouteEnter(to, from, next) {
        let isAuthenticated = localStorage.getItem('userInfo')
        if (isAuthenticated) {
            if (Object.prototype.toString.call(JSON.parse(isAuthenticated)) === '[object Object]') next()
            else next({ name: "login", })
        } else {
            next({ name: "login", })
        }
    }
}
</script>